<h1>Editar Matéria</h1>

<% form_for(@materia) do |f| %>
  <%= f.error_messages %>
  	<h4>Nome</h4>
    <%= f.text_field :nome %>
    <h4>Creditos</h4> 
	<%= f.select :credito,[2,4,6,8], {:selected=> '2'} %>
	<h4>Professor</h4>
	<%= f.select :usuario_id, Usuario.find(:all,:conditions =>["tipousuario_id= 2"]).collect {|item| [item.nome,item.id] } %>
    <h4>Obrigatoria </h4>
    <%= f.check_box :obrigatoria %>
    <%= f.submit 'Atualizar' %>
<% end %>
<a href='<%=materias_path%>'><button type="button">Voltar</button></a>
